package com.araaya.eslimsmobile;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.text.method.LinkMovementMethod;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;


public class HelpActivity  extends Activity {

	String from;
	
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.help_main);
		Intent i= getIntent();
		from=i.getStringExtra("from");
		final TextView help = (TextView) findViewById(R.id.help);
		help.setMovementMethod(LinkMovementMethod.getInstance());
		
		final TextView help_newland = (TextView) findViewById(R.id.help_newland);
		help_newland.setMovementMethod(LinkMovementMethod.getInstance());
		
		final TextView help_adjland = (TextView) findViewById(R.id.help_adjland);
		help_adjland.setMovementMethod(LinkMovementMethod.getInstance());
		
		final TextView help_showland = (TextView) findViewById(R.id.help_showland);
		help_showland.setMovementMethod(LinkMovementMethod.getInstance());
		
		if(from.equals("kmlHome")){
			Log.d("Help Activity"," in KML Help");
			help.setVisibility(View.VISIBLE);
		}else if(from.equals("PointCapture")){
			Log.d("Help Activity"," in PointCapature Help");
			help.setVisibility(View.GONE);
			help_newland.setVisibility(View.VISIBLE);
		}else if(from.equals("AdjecentLand")){
			Log.d("Help Activity"," in AdjecentLand Help");
			help.setVisibility(View.GONE);
			help_adjland.setVisibility(View.VISIBLE);
		}

		/*final TextView winner = (TextView) findViewById(R.id.winner);
		winner.setMovementMethod(LinkMovementMethod.getInstance());

		final TextView link = (TextView) findViewById(R.id.link);
		link.setMovementMethod(LinkMovementMethod.getInstance());
		
		final TextView upgrade = (TextView)findViewById(R.id.upgrade);
		upgrade.setMovementMethod(LinkMovementMethod.getInstance());

		final TextView footer = (TextView) findViewById(R.id.footer_link);
		footer.setMovementMethod(LinkMovementMethod.getInstance());

		final TextView facebook = (TextView) findViewById(R.id.facebook);
		facebook.setMovementMethod(LinkMovementMethod.getInstance());

		final TextView twitter = (TextView) findViewById(R.id.twitter);
		twitter.setMovementMethod(LinkMovementMethod.getInstance());

		final TextView googlePlay = (TextView) findViewById(R.id.web_link);
		googlePlay.setMovementMethod(LinkMovementMethod.getInstance());
*/
		final Button ok = (Button) findViewById(R.id.ok);
		ok.setOnClickListener(new View.OnClickListener() {
			public void onClick(View v) {
				finish();
			}
		});
	}
	
}
